// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';

/** 添加题目 POST /api/question/add */
export async function addQuestionUsingPost(
  body: API.QuestionAddDto,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultBoolean_>('/api/question/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除题目 POST /api/question/delete */
export async function deleteQuestionUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultBoolean_>('/api/question/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 批量删除题目 POST /api/question/deleteBatch */
export async function deleteQuestionBatchUsingPost(
  body: API.QuestionRemoveBatch,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultBoolean_>('/api/question/deleteBatch', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页获取题目列表 POST /api/question/list */
export async function listQuestionUsingPost(
  body: API.QuestionQueryDto,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultPageQuestion_>('/api/question/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页获取题目列表Vo POST /api/question/list/vo */
export async function listQuestionsVoUsingPost(
  body: API.QuestionQueryDto,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultPageQuestionVo_>('/api/question/list/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取题目详情 GET /api/question/queryDetail */
export async function queryQuestionVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryQuestionVoByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultQuestionVo_>('/api/question/queryDetail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 题目查询接口 POST /api/question/search/page */
export async function searchQuestionVoUsingPost(
  body: API.QuestionQueryDto,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultPageQuestion_>('/api/question/search/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改题目 POST /api/question/update */
export async function updateQuestionUsingPost(
  body: API.Question,
  options?: { [key: string]: any },
) {
  return request<API.ResponseResultBoolean_>('/api/question/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
